<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>数据类型 | Interview</title>
    <meta name="description" content="Interview with vitePress">
    <link rel="stylesheet" href="/t-blog/assets/style.c069affc.css">
    <link rel="modulepreload" href="/t-blog/assets/Home.00b10290.js">
    <link rel="modulepreload" href="/t-blog/assets/app.a747ab4f.js">
    <link rel="modulepreload" href="/t-blog/assets/Javascript_advanced.md.338d31ad.lean.js">
    <link rel="modulepreload" href="/t-blog/assets/app.a747ab4f.js">
    <link rel="icon" href="/favicon.ico">
    <meta name="twitter:title" content="数据类型 | Interview">
    <meta property="og:title" content="数据类型 | Interview">
  </head>
  <body>
    <div id="app"><!--[--><div class="theme"><header class="nav-bar" data-v-7161a24b><div class="sidebar-button" data-v-7161a24b><svg class="icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z" class></path></svg></div><a class="nav-bar-title" href="/t-blog/" aria-label="Interview, back to home" data-v-7161a24b data-v-4a583abe><!----> Interview</a><div class="flex-grow" data-v-7161a24b></div><div class="nav" data-v-7161a24b><nav class="nav-links" data-v-7161a24b data-v-15acbf05><!--[--><div class="item" data-v-15acbf05><div class="nav-link" data-v-15acbf05 data-v-641633f9><a class="item isExternal" href="https://www.cooldream.fun/home" target="_blank" rel="noopener noreferrer" data-v-641633f9>我的个人网站 <svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15" data-v-641633f9><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></div><div class="item" data-v-15acbf05><div class="nav-link" data-v-15acbf05 data-v-641633f9><a class="item isExternal" href="https://juejin.cn/user/1855631359481847/posts" target="_blank" rel="noopener noreferrer" data-v-641633f9>掘金 <svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15" data-v-641633f9><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></div><div class="item" data-v-15acbf05><div class="nav-link" data-v-15acbf05 data-v-641633f9><a class="item isExternal" href="https://github.com/Jack-Star-T" target="_blank" rel="noopener noreferrer" data-v-641633f9>Github <svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15" data-v-641633f9><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></div><!--]--><!----><!----></nav></div><!--[--><!--]--></header><aside class="sidebar" data-v-6b49cdcd><nav class="nav-links nav" data-v-6b49cdcd data-v-15acbf05><!--[--><div class="item" data-v-15acbf05><div class="nav-link" data-v-15acbf05 data-v-641633f9><a class="item isExternal" href="https://www.cooldream.fun/home" target="_blank" rel="noopener noreferrer" data-v-641633f9>我的个人网站 <svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15" data-v-641633f9><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></div><div class="item" data-v-15acbf05><div class="nav-link" data-v-15acbf05 data-v-641633f9><a class="item isExternal" href="https://juejin.cn/user/1855631359481847/posts" target="_blank" rel="noopener noreferrer" data-v-641633f9>掘金 <svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15" data-v-641633f9><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></div><div class="item" data-v-15acbf05><div class="nav-link" data-v-15acbf05 data-v-641633f9><a class="item isExternal" href="https://github.com/Jack-Star-T" target="_blank" rel="noopener noreferrer" data-v-641633f9>Github <svg class="icon outbound" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewbox="0 0 100 100" width="15" height="15" data-v-641633f9><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div></div><!--]--><!----><!----></nav><!--[--><!--]--><ul class="sidebar-links" data-v-6b49cdcd><!--[--><li class="sidebar-link"><p class="sidebar-link-item">HTML</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="/t-blog/HTML/">基础</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/t-blog/HTML/advanced">进阶</a><!----></li></ul></li><li class="sidebar-link"><p class="sidebar-link-item">CSS</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="/t-blog/CSS/">基础</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/t-blog/CSS/advanced">进阶</a><!----></li></ul></li><li class="sidebar-link"><p class="sidebar-link-item">Javascript</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="/t-blog/Javascript/">基础</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item active" href="/t-blog/Javascript/advanced">进阶</a><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="#数据类型">数据类型</a><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="#操作符的强制类型转换规则？">== 操作符的强制类型转换规则？</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="#intanceof-操作符的实现原理及实现">intanceof 操作符的实现原理及实现</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="#其他值到字符串的转换规则">其他值到字符串的转换规则</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="#其他值到数字值的转换规则">其他值到数字值的转换规则</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="#其他值到布尔类型的值的转换规则">其他值到布尔类型的值的转换规则</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="#和-操作符的返回值">|| 和 &amp;&amp; 操作符的返回值</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="#object-is-与比较操作符-“-”、“-”-的区别">Object.is() 与比较操作符 “===”、“==” 的区别</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="#javascript-中如何进行隐式类型转换">JavaScript 中如何进行隐式类型转换</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="#object-assign和扩展运算法是深拷贝还是浅拷贝，两者区别">object.assign和扩展运算法是深拷贝还是浅拷贝，两者区别</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="#new操作符的实现原理及实现">new操作符的实现原理及实现</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="#map和object的区别">map和Object的区别</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="#javascript为什么要进行变量提升，它导致了什么问题">JavaScript为什么要进行变量提升，它导致了什么问题</a><!----></li></ul></li><li class="sidebar-link"><a class="sidebar-link-item" href="#es6">ES6</a><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="#es6模块与commonjs模块有什么异同">ES6模块与CommonJS模块有什么异同</a><!----></li></ul></li></ul></li></ul></li><li class="sidebar-link"><p class="sidebar-link-item">Vue</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="/t-blog/Vue/">基础</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/t-blog/Vue/advanced">进阶</a><!----></li></ul></li><li class="sidebar-link"><p class="sidebar-link-item">浏览器</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="/t-blog/Vue/">基础</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/t-blog/Vue/advanced">进阶</a><!----></li></ul></li><li class="sidebar-link"><p class="sidebar-link-item">网络</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="/t-blog/Network/">基础</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/t-blog/Network/advanced">进阶</a><!----></li></ul></li><li class="sidebar-link"><p class="sidebar-link-item">安全</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="/t-blog/Security/">基础</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/t-blog/Security/advanced">进阶</a><!----></li></ul></li><li class="sidebar-link"><p class="sidebar-link-item">面经</p><ul class="sidebar-links"><li class="sidebar-link"><a class="sidebar-link-item" href="/t-blog/Experience/">基础</a><!----></li><li class="sidebar-link"><a class="sidebar-link-item" href="/t-blog/Experience/advanced">进阶</a><!----></li></ul></li><!--]--></ul><!--[--><!--]--></aside><!-- TODO: make this button accessible --><div class="sidebar-mask"></div><main class="page" data-v-7eddb2c4><div class="container" data-v-7eddb2c4><!--[--><!--]--><div style="position:relative;" class="content" data-v-7eddb2c4><div><h2 id="数据类型"><a class="header-anchor" href="#数据类型" aria-hidden="true">#</a> 数据类型</h2><h3 id="操作符的强制类型转换规则？"><a class="header-anchor" href="#操作符的强制类型转换规则？" aria-hidden="true">#</a> == 操作符的强制类型转换规则？</h3><h3 id="intanceof-操作符的实现原理及实现"><a class="header-anchor" href="#intanceof-操作符的实现原理及实现" aria-hidden="true">#</a> intanceof 操作符的实现原理及实现</h3><h3 id="其他值到字符串的转换规则"><a class="header-anchor" href="#其他值到字符串的转换规则" aria-hidden="true">#</a> 其他值到字符串的转换规则</h3><h3 id="其他值到数字值的转换规则"><a class="header-anchor" href="#其他值到数字值的转换规则" aria-hidden="true">#</a> 其他值到数字值的转换规则</h3><h3 id="其他值到布尔类型的值的转换规则"><a class="header-anchor" href="#其他值到布尔类型的值的转换规则" aria-hidden="true">#</a> 其他值到布尔类型的值的转换规则</h3><h3 id="和-操作符的返回值"><a class="header-anchor" href="#和-操作符的返回值" aria-hidden="true">#</a> || 和 &amp;&amp; 操作符的返回值</h3><h3 id="object-is-与比较操作符-“-”、“-”-的区别"><a class="header-anchor" href="#object-is-与比较操作符-“-”、“-”-的区别" aria-hidden="true">#</a> <a href="http://Object.is" target="_blank" rel="noopener noreferrer">Object.is</a>() 与比较操作符 “===”、“==” 的区别</h3><h3 id="javascript-中如何进行隐式类型转换"><a class="header-anchor" href="#javascript-中如何进行隐式类型转换" aria-hidden="true">#</a> JavaScript 中如何进行隐式类型转换</h3><h3 id="object-assign和扩展运算法是深拷贝还是浅拷贝，两者区别"><a class="header-anchor" href="#object-assign和扩展运算法是深拷贝还是浅拷贝，两者区别" aria-hidden="true">#</a> object.assign和扩展运算法是深拷贝还是浅拷贝，两者区别</h3><h3 id="new操作符的实现原理及实现"><a class="header-anchor" href="#new操作符的实现原理及实现" aria-hidden="true">#</a> new操作符的实现原理及实现</h3><h3 id="map和object的区别"><a class="header-anchor" href="#map和object的区别" aria-hidden="true">#</a> map和Object的区别</h3><h3 id="javascript为什么要进行变量提升，它导致了什么问题"><a class="header-anchor" href="#javascript为什么要进行变量提升，它导致了什么问题" aria-hidden="true">#</a> JavaScript为什么要进行变量提升，它导致了什么问题</h3><h2 id="es6"><a class="header-anchor" href="#es6" aria-hidden="true">#</a> ES6</h2><h3 id="es6模块与commonjs模块有什么异同"><a class="header-anchor" href="#es6模块与commonjs模块有什么异同" aria-hidden="true">#</a> ES6模块与CommonJS模块有什么异同</h3></div></div><footer class="page-footer" data-v-7eddb2c4 data-v-fb8d84c6><div class="edit" data-v-fb8d84c6><div class="edit-link" data-v-fb8d84c6 data-v-1ed99556><!----></div></div><div class="updated" data-v-fb8d84c6><!----></div></footer><div class="next-and-prev-link" data-v-7eddb2c4 data-v-38ede35f><div class="container" data-v-38ede35f><div class="prev" data-v-38ede35f><a class="link" href="/t-blog/Javascript/" data-v-38ede35f><svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" class="icon icon-prev" data-v-38ede35f><path d="M19,11H7.4l5.3-5.3c0.4-0.4,0.4-1,0-1.4s-1-0.4-1.4,0l-7,7c-0.1,0.1-0.2,0.2-0.2,0.3c-0.1,0.2-0.1,0.5,0,0.8c0.1,0.1,0.1,0.2,0.2,0.3l7,7c0.2,0.2,0.5,0.3,0.7,0.3s0.5-0.1,0.7-0.3c0.4-0.4,0.4-1,0-1.4L7.4,13H19c0.6,0,1-0.4,1-1S19.6,11,19,11z"></path></svg><span class="text" data-v-38ede35f>基础</span></a></div><div class="next" data-v-38ede35f><a class="link" href="/t-blog/Vue/" data-v-38ede35f><span class="text" data-v-38ede35f>基础</span><svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" class="icon icon-next" data-v-38ede35f><path d="M19.9,12.4c0.1-0.2,0.1-0.5,0-0.8c-0.1-0.1-0.1-0.2-0.2-0.3l-7-7c-0.4-0.4-1-0.4-1.4,0s-0.4,1,0,1.4l5.3,5.3H5c-0.6,0-1,0.4-1,1s0.4,1,1,1h11.6l-5.3,5.3c-0.4,0.4-0.4,1,0,1.4c0.2,0.2,0.5,0.3,0.7,0.3s0.5-0.1,0.7-0.3l7-7C19.8,12.6,19.9,12.5,19.9,12.4z"></path></svg></a></div></div></div><!--[--><!--]--></div></main></div><!----><!--]--></div>
    <script>__VP_HASH_MAP__ = JSON.parse("{\"index.md\":\"9526c2f8\",\"css_advanced.md\":\"b4514e32\",\"css_index.md\":\"1886c3ca\",\"html_advanced.md\":\"3c922e72\",\"html_index.md\":\"dbc74871\",\"javascript_advanced.md\":\"338d31ad\",\"javascript_index.md\":\"71bdd912\"}")</script>
    <script type="module" async src="/t-blog/assets/app.a747ab4f.js"></script>
  </body>
</html>